//============================================================================
// Name        : SDL_ProjectBase.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include "SnowApplication.h"

#define endl2 endl<<endl

const int WINDOW_WIDTH = 800;
const int WINDOW_HEIGHT = 600;
const int WINDOW_DEPTH = 24;

int main(int argc, char *argv[])
{
	int vAppExitStatus = EXIT_SUCCESS;

	cout << "main: Build class application" << endl2;
	SnowApplication *snowApplication = new SnowApplication();

	if (!vAppExitStatus)
	{
		cout << "main: Initializing application..." << endl;
		vAppExitStatus += snowApplication->appInitialize(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_DEPTH);
		cout << (vAppExitStatus ? "Failed" : "OK") << endl2;
	}

	if (!vAppExitStatus)
	{
		cout << "main: Launching application..." << endl;
		vAppExitStatus += snowApplication->appLaunch();
		cout << (vAppExitStatus ? "Failed" : "OK") << endl2;
	}

	cout << "main: Deleting Application" << endl2;
	if (snowApplication != NULL)
		delete snowApplication, snowApplication = NULL;

	cout << "main: Exiting" << endl2;
	return vAppExitStatus;
}
